<%@page import="java.sql.*"%>
<%
String PersonId=request.getParameter("PersonId");

String UserName = request.getParameter("UserName");
String FirstName = request.getParameter("FirstName");
String LastName = request.getParameter("LastName");
String Address = request.getParameter("Address");
String City = request.getParameter("City");
String State = request.getParameter("State");
String ZipCode = request.getParameter("ZipCode");
String Phone = request.getParameter("Phone");

String Email = request.getParameter("Email");
String CreditCard = request.getParameter("CreditCard");
String Rating = request.getParameter("Rating");

String SSN = request.getParameter("SSN");
String StartDate = request.getParameter("StartDate");
String HourlyRate = request.getParameter("HourlyRate");
String Position = request.getParameter("Position");


try{
Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/snazzy_bids","root", "");

Statement st=null;
st=conn.createStatement();


st.executeUpdate("UPDATE Person set PersonId='"+PersonId+"',LastName='"+LastName+"',FirstName='"+FirstName+"',Address='"+Address+"',City='"+City+"',State='"+State+"',ZipCode='"+ZipCode+"',Phone='"+Phone+"' WHERE PersonId="+PersonId);
st.executeUpdate("UPDATE Customer set PersonId='"+PersonId+"',CreditCard='"+CreditCard+"',Email='"+Email+"',UserName='"+UserName+"',Rating='"+Rating+"' WHERE PersonId="+PersonId);
response.sendRedirect("ManagerHomePage.jsp");
}
catch(Exception e){
System.out.println(e);
}
%>


